﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;

namespace Web
{
    public class Global : System.Web.HttpApplication
    {
        public override void Init()
        {
            base.Init();
            PreSendRequestHeaders += Global_PreSendRequestHeaders;
        }

        protected void Global_PreSendRequestHeaders(object sender, EventArgs e)
        {
            HttpContext.Current.Response.Headers.Remove("Server");
            HttpContext.Current.Response.Headers.Remove("X-AspNet-Version");
            HttpContext.Current.Response.Headers.Remove("X-SourceFiles");
            HttpContext.Current.Response.Headers.Remove("Last-Modified");
            //HttpContext.Current.Response.Headers.Set("Author", "沙漠风设计制作 www.szweb.cn");
        }

        protected void Application_Start(object sender, EventArgs e)
        {
            //new Evan.DataBase.DbSchema().MultiDbSchema();
            //FluentScheduler.JobManager.Initialize(new BLL.JobService.JobRegistry());
        }
        protected void Application_End(object sender, EventArgs e)
        {

        }


        protected void Application_BeginRequest(object sender, EventArgs e)
        {
            
        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {

        }

        protected void Application_Error(object sender, EventArgs e)
        {
            if (Convert.ToInt32(Evan.Common.CommFun.GetAppSetting("CusError")) == 1)
            {
                Evan.Common.ThrowException.ApplicationError(Context);
            }
        }

        protected void Session_Start(object sender, EventArgs e)
        {

        }
        protected void Session_End(object sender, EventArgs e)
        {

        }
        

    }
}